import React,{Component} from "react";
import PropTypes from 'prop-types'


// 分别暴露
export class App1 extends Component{
  static propTypes = {
    userName:PropTypes.string,
    age:PropTypes.number.isRequired
  }
  static defaultProps = {
    age:100
  }
  render(){
    return (
      <>
        <div>App1</div>
         <div>userName:{this.props.userName}</div>
        <div>age:{this.props.age}</div>
      </>
    )
  }
}

const App2 = class App2 extends Component{
  render(){
    return (
      <>
        <div>App2</div>
      </>
    )
  }
}
class App3 extends Component{
  render(){
    return (
      <>
        <div>App3</div>
      </>
    )
  }
}
export {
  App2,App3
}

// 默认暴露
export default class App4 extends Component{
  render(){
    return (
      <>
        <div>App4</div>
      </>
    )
  }
}
